package com.example.hrandroidapp.domain;

public class ServerPO {

	private String svrName;
	private String svrIP;
	private boolean check;
	
	public ServerPO() {}
	
	public ServerPO(String svrName, String svrIP) {
		this.svrName=svrName;
		this.svrIP=svrIP;
	}
	
	public ServerPO(String svrName, String svrIP, boolean check) {
		this(svrName, svrIP);
		this.check=check;
	}
	
	public String getSvrName() {
		return svrName;
	}
	public void setSvrName(String svrName) {
		this.svrName = svrName;
	}
	public String getSvrIP() {
		return svrIP;
	}
	public void setSvrIP(String svrIP) {
		this.svrIP = svrIP;
	}
	public boolean isCheck() {
		return check;
	}
	public void setCheck(boolean check) {
		this.check = check;
	}

	public boolean equal(Object obj) {
		if(obj == null) return false;
		if(this.getClass().equals(obj.getClass())) return false;
		
		ServerPO svrPO = (ServerPO) obj;
		if(svrPO.getSvrIP().equals(svrPO.getSvrIP())) return true;
		return false;
	}
	public void editServer(String editSvrName, String editSvrIP) {
		this.setSvrName(editSvrName);
		this.setSvrIP(editSvrIP);
	}
	
}
